package com.yuyou.fn.balance.service;

import com.github.wens.framework.service.ISuperService;
import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.balance.entity.TmsBalanceTransfer;
import com.yuyou.fn.balance.vo.TmsBalanceTransferQueryVo;
import com.yuyou.fn.balance.vo.TmsStudentAccount;
import com.yuyou.fn.balance.vo.TmsTransferResult;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;

import java.math.BigDecimal;

/**
 *
 * TmsBalanceTransfer 表数据服务层接口
 *
 */
public interface ITmsBalanceTransferService extends ISuperService<TmsBalanceTransfer,Long> {

    Page<TmsBalanceTransfer> findCompleteTmsBalanceTransferPage(TmsBalanceTransferQueryVo tmsBalanceTransferQueryVo, int pageNo, int pageSize);

    TmsBalanceTransfer savePrepareTmsBalanceTransfer(Long studentId,BigDecimal amount);

    SXSSFWorkbook exportCompleteTmsBalanceTransfer(TmsBalanceTransferQueryVo tmsBalanceTransferQueryVo);

    TmsStudentAccount queryTmsStudentBalance(Long studentId);

    TmsStudentAccount queryStudentDealBalance(Long studentId);

    TmsTransferResult comfirmTransferTmsBalance(Long studentId,BigDecimal amount);

    TmsTransferResult transferTmsBalance(Long studentId,BigDecimal amount,Boolean throwExecption);

    TmsBalanceTransfer findOrCreatePrepareByStudentId(Long studentId,BigDecimal amount);

    TmsBalanceTransfer findUnComplete(Long studentId);

    void completeTmsTransferBalance(Long tmsBalanceTransferId,BigDecimal amount);
}